package com.sinosoft.ptas.system.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sinosoft.framework.core.common.utils.ajax.ResponseData;
import com.sinosoft.ptas.control.dto.ReportData;
import com.sinosoft.ptas.control.dto.TargetsOfImplphaseData;

@Controller
@RequestMapping(value = "system")
public class SystemController {
	@RequestMapping(value = "/getPage.service")
	public String getPage(String path) {
		return path;
	}
	
	@RequestMapping(value="/saveReportTabel.service", method=RequestMethod.POST)
	@ResponseBody
	public ResponseData saveReportTabel(ReportData data){
		if(data == null) {
			return new ResponseData(false, null);
		}
		ReportData report = new ReportData();
		report.setId("111");
		ResponseData response = new ResponseData(true, report);
		return response;
	}
	
	
	@RequestMapping(value="/saveTargetOfImpPhaseTabel.service", method=RequestMethod.POST)
	@ResponseBody
	public ResponseData saveTargetOfImpPhaseTabel(@RequestBody TargetsOfImplphaseData targetsOfImplphaseData){
		if(targetsOfImplphaseData == null) {
			return new ResponseData(false, null);
		}
		TargetsOfImplphaseData target = new TargetsOfImplphaseData();
		target.setId("111");
		ResponseData response = new ResponseData(true, target);
		return response;
	}
	
}
